package com.ruoyi.restaurant.service.impl;

import com.ruoyi.restaurant.domain.dto.DailyRevenueDTO;
import com.ruoyi.restaurant.domain.dto.DishProcurementVolumeDTO;
import com.ruoyi.restaurant.domain.dto.DishRankingDTO;
import com.ruoyi.restaurant.mapper.StatisticsMapper;
import com.ruoyi.restaurant.service.IStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RestStatisticsServiceImpl implements IStatisticsService {
    @Autowired
    private StatisticsMapper statisticsMapper;

    @Override
    public List<DailyRevenueDTO> getDailyRevenue() {
        return statisticsMapper.selectDailyRevenue();
    }

    @Override
    public List<DishProcurementVolumeDTO> getProcurementVolume() {
        return statisticsMapper.selectDishProcurementVolume();
    }

    @Override
    public List<DishRankingDTO> getDishOrderRanking() {
        return statisticsMapper.selectDishOrderRanking();
    }
}
